<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <!-- incluides方法(value,[index])，如果有该值返回true，没有返回false -->
    <script>
        function sele(arr) {
            var temp = [];
            arr.forEach(value => {
                temp.includes(value) || temp.push(value);
            });
            return temp;
        }
        var arr = ['aa', 'bb', 'cc', '', 1, 0, '1', 1, 'bb', null, undefined, null];
        console.log(sele(arr));
    </script>
</body>

</html>